package com.example.tianyutong.qanda.ui.question.adapter;

import com.example.tianyutong.qanda.R;
import com.example.tianyutong.qanda.app.ConstantsImageUrl;
import com.example.tianyutong.qanda.base.binding.BaseBindingAdapter;
import com.example.tianyutong.qanda.base.binding.BaseBindingHolder;
import com.example.tianyutong.qanda.databinding.ItemAnswerBinding;
import com.example.tianyutong.qanda.ui.question.Answer;
import com.example.tianyutong.qanda.utils.GlideUtil;

public class AnswerAdapter extends BaseBindingAdapter<Answer, ItemAnswerBinding> {

    public AnswerAdapter() {
        super(R.layout.item_answer);
    }

    @Override
    protected void bindView(BaseBindingHolder holder, Answer bean, ItemAnswerBinding binding, int position) {


        GlideUtil.displayCircle(binding.ivAvatar, ConstantsImageUrl.IC_AVATAR);
        binding.setAnswer(bean);
        binding.setCommand(AnswerAdapter.this);
        binding.executePendingBindings();
    }
}
